import { getAction, deleteAction, putAction, postAction, httpAction, postFormData } from '@/api/manage'
const gateway = '/gateway/api'

// 搭配师管理
export const fashionerList = params => postAction(`${gateway}/admin/fashioner/list`, params) // 搭配师、导购列表查询
export const fashionerDetail = params => postAction(`${gateway}/admin/fashioner/detail`, params) // 搭配师详情
export const fashionerCreate = params => postAction(`${gateway}/admin/fashioner/create`, params) // 搭配师创建、编辑
export const fashionerGetCase = params => postAction(`${gateway}/admin/fashioner/getCaseByFashionerId`, params) // 搭配师案例列表
export const fashionerCreateCase = params => postAction(`${gateway}/admin/fashioner/createOrUpdateCase`, params) // 新增或者编辑搭配师案例
export const fashionerCaseUpdateSort = params => postAction(`${gateway}/admin/fashioner/updateSort`, params) // 案例顺序
export const fashionerDeleteCaseById = params => postAction(`${gateway}/admin/fashioner/deleteById`, params) //删除案例
export const fashionerGetEvaluateList = params => postAction(`${gateway}/admin/fashioner/getEvaluateList`, params) // 搭配师评价
export const fashionerUpdateEvaluate = params => postAction(`${gateway}/admin/fashioner/updateEvaluationIsShow`, params) // 编辑搭配师评价是否可见

// 活动管理
export const activityList = params => postAction(`${gateway}/admin/activity/list`, params) // 查询红包活动列表
export const activityDetail = params => postAction(`${gateway}/admin/activity/detail`, params) // 红包活动详情
export const activityCreate = params => postAction(`${gateway}/admin/activity/create`, params) // 红包活动创建

export const couponList = params => postAction(`${gateway}/admin/coupon/list`, params) // 查询券列表
export const couponEditDetail = params => postAction(`${gateway}/admin/coupon/createOrUpdate`, params) // 优惠券创建
export const sendCouponList = params => postAction(`${gateway}/admin/coupon/sendCouponList`, params) // 券-发放任务记录
export const createSendCoupon = params => postAction(`${gateway}/admin/coupon/createSendCoupon`, params) // 券-创建发送任务
export const cancelSendCoupon = params => postAction(`${gateway}/admin/coupon/cancelSendCoupon`, params) // 券-取消发送任务

// 属性管理
export const attrCreateOrUpdate = params => postAction(`${gateway}/admin/attr/createOrUpdate`, params) // 创建属性
export const attrCreateOrUpdateValue = params => postAction(`${gateway}/admin/attr/createOrUpdateValue`, params) // 创建属性值
export const attrList = params => postAction(`${gateway}/admin/attr/list`, params) // 查询属性列表
export const attrValueList = params => postAction(`${gateway}/admin/attr/valueList`, params) // 查询属性值列表
export const couponDetail = params => postAction(`${gateway}/admin/coupon/createOrUpdate`, params) // 优惠券创建

// 公众号送券
export const replyList = params => postAction(`${gateway}/admin/mp/reply/list`, params) // 查询公众号送券列表
export const replyDetail = params => postAction(`${gateway}/admin/mp/reply/detail`, params) // 公众号送券详情
export const replyCreate = params => postAction(`${gateway}/admin/mp/reply/create`, params) // 公众号送券创建
// export const updateStatus = params => postAction(`${gateway}/admin/mp/reply/updateStatus`, params) // 公众号送券状态

// 用户奖励
export const queryUserShareSetting = params => postAction(`${gateway}/admin/attr/queryUserShareSetting`, params) // 查询用户奖励配置
export const saveUserShareSetting = params => postAction(`${gateway}/admin/attr/saveUserShareSetting`, params) // 保存用户奖励配置

// 推广设置
export const exclusiveSave = params => postAction(`${gateway}/admin/exclusive/saveOrUpdate`, params) // 编辑或者保存
export const exclusiveData = params => getAction(`${gateway}/admin/exclusive/findData`, params) // 查询数据
export const createSceneSubAndAskBox = params => postAction(`${gateway}/admin/customerAskBox/createSceneSubAndAskBox`, params) // 创建搭配师 订阅和要盒的专属二维码 单纯的只有二维码
export const currFashioner = params => postAction(`${gateway}/admin/fashioner/currFashioner`, params) // 获取当前用户是否是搭配师 ，如果是搭配师 返回给你搭配师所有信息

// 屏蔽策略
export const shieldStrategyList = params => postAction(`${gateway}/admin/shieldStrategy/list`, params) // 获取列表
export const shieldStrategyAdd = params => getAction(`${gateway}/admin/shieldStrategy/add/${params}`) // 新增
export const shieldStrategyDel = params => getAction(`${gateway}/admin/shieldStrategy/del/${params}`) // 删除

export const getGiftCopy = params => getAction(`${gateway}/openapi/goods/fourYear/getGiftCopy`) // 获取四周年满赠文案
export const getGiftIfOpen = params => getAction(`${gateway}/openapi/goods/fourYear/getGiftIfOpen`)// 获取4周年满赠文案状态 0关闭 1开启
export const saveGiftCopy = params => getAction(`${gateway}/openapi/goods/fourYear/saveGiftCopy/${params}`)// 配置四周年满赠文案
export const setGiftIfOpen = params => getAction(`${gateway}/openapi/goods/fourYear/setGiftIfOpen/${params}`)// 配置四周年满赠文案开关

// 大内淘
export const getEbSafetyStock = params => getAction('/gateway/api/admin/boxEb/getEbSafetyStock', params) // 获取大内淘安全库存数
export const setEbSafetyStock = params => getAction(`/gateway/api/admin/boxEb/setEbSafetyStock/${params}`) // 设置大内淘安全库存数
export const ebStoreList = params => postAction('/gateway/api/admin/boxEb/storeList', params) // BOX内淘门店列表
export const ebOpenOrClose = params => getAction(`/gateway/api/admin/boxEb/openOrClose/${params}`) // BOX内淘门店开关
export const ebOrderList = params => postAction('/gateway/api/admin/boxEb/ebOrderList', params) // BOX内淘预警列表
export const closeEbOrder = id => getAction(`/gateway/api/admin/boxEb/closeEbOrder/${id}`) // BOX内淘预警列表操作---结案
export const getTransGoodsInfo = params => postAction('/gateway/api/admin/boxEb/getTransGoodsInfo', params) // 获取调拨商品信息
export const allotsBox2Store = params => postAction('/gateway/api/admin/boxEb/allotsBox2Store', params) // 提交调拨
export const getBoxShopStock = params => postAction('/gateway/api/admin/boxEb/getBoxShopStock', params) // 获取box仓商品库存
